package ${package.FeignClient};

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${package.Parent}.config.FeignConfiguration;
import ${package.DTO}.${entity}DTO;
import ${package.DTO}.${entity}PageDTO;
import ${package.Fallback}.${entity}Fallback;
import ${package.VO}.${entity}PageVO;
import ${package.VO}.${entity}VO;
import com.hz.common.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 云路供应链科技有限公司 版权所有 © Copyright 2019<br>
 *
 * ${table.comment!} Feign 接口
 *
 * @author ${author} created on ${date}
 */
@Component
@FeignClient(name = "ylgatewayapi",path = "/commissionapi/${entity?uncap_first}", configuration = FeignConfiguration.class, fallback = ${entity}Fallback.class)
public interface ${entity}FeignClient {

    @PostMapping("/add")
    Result<Boolean> add(@Validated @RequestBody ${entity}DTO ${entity?uncap_first}DTO) ;

    @PostMapping("/page")
    Result<Page<${entity}PageVO>> page(@RequestBody ${entity}PageDTO ${entity?uncap_first}PageDTO);

    @PostMapping("/delete")
    Result<Boolean> delete(@RequestParam("id") Integer id) ;

    @GetMapping("/detail")
    Result<${entity}VO> detail(@RequestParam("id") Integer id);

    @PostMapping("/update")
    Result<Boolean> update(@Validated @RequestBody ${entity}DTO ${entity?uncap_first}DTO);
}
